package com.lkx.farmershop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lkx.farmershop.common.api.ApiResult;
import com.lkx.farmershop.model.dto.ExitGroupDto;
import com.lkx.farmershop.model.dto.HomeRequestDto;
import com.lkx.farmershop.model.dto.TuanDto;
import com.lkx.farmershop.model.entity.JoinReasonInfo;
import com.lkx.farmershop.model.entity.Tuan;
import com.lkx.farmershop.model.vo.*;

import java.util.List;

/**
 * (Tuan)表服务接口
 *
 * @author makejava
 * @since 2025-01-21 23:17:09
 */
public interface TuanService extends IService<Tuan> {

    ApiResult<String> saveDraft(TuanDto tuanDto);
    ApiResult<String> sendTuan(TuanDto tuanDto);

    ApiResult<List<DraftsVo>> getDrafts(Long userId);

    ApiResult<TuanDto> getTuanById(Long tuanId);

    ApiResult<String> deleteDraft(Long tuanId);

    ApiResult<List<GroupVo>> getGroupList(HomeRequestDto homeRequestDto);

    ApiResult<GroupDetailVo> getGroupById(Long tuanId, Long userId);

    ApiResult<String> joinGroup(JoinReasonInfo joinReasonInfo);

    ApiResult<List<DraftsVo>> getMyJoin(Long userId);

    ApiResult<String> exitGroup(ExitGroupDto exitGroupDto);

    ApiResult<String> endTuan(Long tuanId);

    ApiResult<List<DraftsVo>> getSend(Long userId);

    ApiResult<List<JoinApplyVo>> getJoinInfo(Long tuanId);

    ApiResult<UserHomeVo> getUserHome(Long theUserId, Long userId);
}

